package com.SoftwareManage.service.impl;

import com.SoftwareManage.dao.CaeDao;
import com.SoftwareManage.entity.Cae;
import com.SoftwareManage.service.CaeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;

@Service
public class CaeServiceImpl implements CaeService {
    @Autowired
    private CaeDao caeDao;
    @Override
    public List<Cae> selectAll() {
        return caeDao.selectAll();
    }

    @Override
    public List<Cae> selectAlls(int page, int pageSize) {
        return caeDao.selectAlls(page,pageSize);
    }

    @Override
    public List<Cae> search(String software, String person) {
        return caeDao.search(software, person);
    }

    @Override
    public List<Cae> searchs(String software, String person, int page, int pageSize) {
        return caeDao.searchs(software, person, page, pageSize);
    }

    @Override
    public void update(int id, String software, String person, String ip, String server, String address, String port, Date datedue, String license, String remark) {
        caeDao.update(id, software, person, ip, server, address, port, datedue, license, remark);
    }

    @Override
    public void add(String software, String person, String ip, String server, String address, String port, Date datedue, String license, String remark) {
        caeDao.add(software, person, ip, server, address, port, datedue, license, remark);
    }

    @Override
    public void delete(int id) {
        caeDao.delete(id);
    }

    @Override
    public Cae findById(int id) {
        return caeDao.findById(id);
    }

    @Override
    public List<String> selectAllSoftwares() {
        return caeDao.selectAllSoftwares();
    }
}
